#ifndef PARAFLUIDSIMULATIONWIDGET_H
#define PARAFLUIDSIMULATIONWIDGET_H

#include <QGLWidget>
#include <QKeyEvent>
#include <QMouseEvent>
#include <QWheelEvent>

#include "parafluidcamera.h"

namespace ParaFluid
{
	
	/**
	* Simulation Widget
	*/
	class SimulationWidget
		: public QGLWidget
	{
		
		Q_OBJECT
		
	public:
	   
	   /**
	   * Destructor
	   */
	   ~SimulationWidget();
	   
	   /**
	   * Default Constructor
	   */
	   SimulationWidget(QWidget * parent = 0);
	   
	public slots:
		
		/**
		* Redraw SPH
		*/
		void redrawSPH();
		
	protected:
		
		/**
		* @reimplemented from QGLWidget
		*/
	   void initializeGL();
		
		/**
		* @reimplemented from QGLWidget
		*/
	   void resizeGL(int width , int height);
		
		/**
		* @reimplemented from QGLWidget
		*/
	   void paintGL();
		
		/**
		* @reimplemented from QWidget
		*/
	   void mousePressEvent(QMouseEvent *event);
		
		/**
		* @reimplemented from QWidget
		*/
	   void mouseMoveEvent(QMouseEvent *event);
		
		/**
		* @reimplemented from QWidget
		*/
	   void keyPressEvent(QKeyEvent * event);
		
	private:
		
		/**
		* Camera
		*/
	   Camera _camera;
		
		/**
		* Mouse Last Position
		*/
	   QPoint _mouseLastPosition;
		
		/**
		* Atom Radius
		*/
	   double _atomRadius;
		
		/**
		* Can we Access SPH structure
		*/
	   bool _canAccessSPH;
	   
	   /**
	   * Copy Constructor
	   */
	   SimulationWidget(const SimulationWidget & other);
	   
	   /**
	   * Assignment Operator
	   */
	   SimulationWidget & operator= (const SimulationWidget & rhs);
	   
	};
	
}

#endif

